package org.djw.hrm.service.impl;

import org.djw.hrm.domain.Login;
import org.djw.hrm.domain.MealAndLogin;
import org.djw.hrm.mapper.LoginMapper;
import org.djw.hrm.service.ILoginService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * <p>
 * 登录表 服务实现类
 * </p>
 *
 * @author djw
 * @since 2022-02-10
 */
@Service
public class LoginServiceImpl extends ServiceImpl<LoginMapper, Login> implements ILoginService {

    @Autowired
    private LoginMapper loginMapper;

    @Override
    public Login getByUsername(String username) {
        return loginMapper.getByUsername(username);
    }

    @Override
    public void insertLogAndMeal(MealAndLogin mealAndLogin) {
        loginMapper.saveMealAndLogin(mealAndLogin);
    }

}
